package com.bruce.starts.demo.guava.ordering;

import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;

import java.util.List;

public class OrderingTest {
    public static void main(String[] args) {
        Ordering<Comparable> natural = Ordering.natural();
        List<Integer> list = Lists.newArrayList();
        list.add(1);
        list.add(11);
        list.add(2);
        list.add(34);
        list.add(12);
        list.add(6);
        list.add(9);
        System.out.println(natural.sortedCopy(list));
    }
}
